package PTA.javajibenyufa;

import java.util.Arrays;
import java.util.Scanner;

public class ex04 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(sc.hasNextInt()){
            int n = sc.nextInt();
            String str[][] = new String[n][n];
            for(int i=1;i<=n;i++){
                for(int j=1;j<=i;j++){
                    String s=i+"*"+j+"="+i*j;
                    System.out.printf(s);
                    str[i-1][j-1]=s;
                    if(j<i){
                        int p = Math.max((7-s.length()),0);
                        for(int k=0;k<p;k++){
                            System.out.printf(" ");
                        }
                    }
                } System.out.println();
            }
            System.out.println(Arrays.deepToString(str).replace(", null",""));
        }
    }
}
